Data Analysis using R‍💻

Oluwafemi Oyedele

2024-07-02

Welcome!

About me

  • PhD Student at MSU



  • Active member of the TidyTuesday project.


Headshot of Oluwafemi

May I meet you ?

Learning Objectives✍️✍️✍️

  • Installation of R and R Studio

  • Introduction to R and R Studio.

  • Data Import and Export

  • Descriptive statistics

  • Data wrangling

  • Analysis of Variance (CRD, RCBD, Split Plot)

  • Post Hoc Test

  • Data Visualization

Overview

  • By the end of this training, you should feel confident approaching data from the agricultural sector using R

  • We will cover virtually no statistics

  • However it is the intention that this training will leave you comfortable to:

    • understand/solve statistical problems using R

    • interpret results generated by R

Install R and R Studio)

Headshot of Dr. Maria Tackett

RStudio Installation Cont.

Download Training Material from Github

  • Option 1: Download the zip file directly from github and then unzip it

  • Option 2: Run the following command below in RStudio console pane:

install.packages("usethis")
library(usethis) # This line loads the usethis package into R memory
use_course("https://github.com/BB1464/Data-Analysis-using-R/archive/refs/heads/master.zip") # this line will pull all the source code from my github repo into your system.
  • You’ll now have a copy of the project created for this training on your computer.

Congratulation we are now set for the training !!!

What is R💥💥💥

Headshot of Dr. Maria Tackett

  • A widely used programming language for data analysis

  • Based on statistical programming language S (1976)

  • Developed by Ross Ihaka & Robert Gentleman (1995)

  • Very active community, with many packages

  • Open source!

If one already knows Stata or similar software, why use R?😂😂😂

  • R is free, so you don’t need a terminal server

  • R has a very large community.

  • R can handle virtually any data format.

  • Analyses done using R are reproducible

  • Using R makes collaboration easier.

  • Finding answers to questions is much simpler in R

What is R Studio ️👁️‍🗨️👁️‍🗨️👁️‍🗨️

Headshot of Dr. Maria Tackett

  • Integrated Development Environment (IDE) for R that can make your life easier.

  • Founded by J.J. Allaire, available since 2010

RStudio can:💥💥💥

  • Organize your code, output, and plots.

  • Auto-complete code and highlight syntax.

  • Help view data and objects.

  • Enable easy integration of R code into documents with quarto and R Markdown

Open R Studio

  • We should see something like this

R Studio Interface

 

Demonstration👨‍💻👨‍💻👨‍💻

  • Demonstration on the various tabs found in R and R Studio.

Getting Help

  • We can use the ? to get help about anything we are confused about in R.
?read_csv

Tidyverse website

(https://www.tidyverse.org/)

Package Vignettes

(https://cran.r-project.org/web/packages/skimr/vignettes/Using_skimr.html)

Twitter

(https://twitter.com/search?q=%23rstats)

Data Science Learning Community

Google

(https://twitter.com/ekaleedmiston/status/1081221822186696706)

Finding more functions and packages

R Documentation

Rseek to look for help

https://rseek.org/

R Cheat Sheet

R Cheat Sheet

Chat GPT

Resources to Learn More

QUESTIONS?